//
//  StarIconView.m
//  WULIHH
//
//  Created by tang on 16/4/20.
//  Copyright © 2016年 tang. All rights reserved.
//

#import "StarIconView.h"
#import "Header.h"


@interface StarIconView ()
{
    UIImageView *imageView;
    UILabel *nameLable;
}

@end


@implementation StarIconView


- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        
        [self setUserInteractionEnabled:YES];
        [self initUI];
    }
    return self;
}




- (void)initUI
{
    imageView = [[UIImageView alloc] initWithFrame:CGRectMake( 0, 0, 65, 65)];
    [imageView setBackgroundColor:[UIColor redColor]];
    [imageView.layer setCornerRadius:65.0 / 2.0];
//    [topImageView setImage:image];
    [self addSubview:imageView];
    
    
    nameLable = [[UILabel alloc] initWithFrame:CGRectMake(13, 73, 34, 15)];
    
    [nameLable setTextAlignment:NSTextAlignmentCenter];
    [nameLable setFont:[UIFont systemFontOfSize:15.0]];
    [self addSubview:nameLable];
    
//    UIButton *topbutton = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 65, 90)];
//    [topbutton addTarget:self action:@selector(TouchEvent) forControlEvents:UIControlEventTouchUpInside];
//    [self addSubview:topbutton];
}


- (void)setModelWithDic:(NSDictionary *)dic
{
    NSLog(@"%@", dic);
}


//- (void)TouchEvent
//{
//    NSLog(@"1111");
//}


/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
